package cn.ccccltd.waf.id_generator.config.sql;

import java.util.List;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import cn.ccccltd.waf.id_generator.config.sql.param.QueryParams;

public interface CommonMapper<T> {
	
	@SelectProvider(type = CommonSqlProvider.class, method = "getByPage")
	List<T> getUserByPage(QueryParams queryParams, T bean);
	
	@InsertProvider(type = CommonSqlProvider.class, method = "insert")
	int insert(T bean);

	@DeleteProvider(type = CommonSqlProvider.class, method = "delete")
	int delete(T bean);

	@UpdateProvider(type = CommonSqlProvider.class, method = "update")
	int update(T bean);
	
	@SelectProvider(type = CommonSqlProvider.class, method = "get")
	T get(T bean);
	
}
